//
//  NSArray+Ext.m
//  Weike
//
//  Created by leirz on 14/10/31.
//  Copyright (c) 2014年 winupon. All rights reserved.
//

#import "NSArray+Ext.h"

@implementation NSArray (Ext)

- (NSInteger)integerAtIndex:(NSUInteger)index
{
    NSNumber *value = [self objectAtIndex:index];
    if (value == nil) {
        return 0;
    }
    return value.integerValue;
}

-(id)anyObject
{
    return [self objectAtIndex:(arc4random() % (self.count))];
}

@end
